using System;
using System.Collections;
using System.Collections.Generic;

using BVMB.DataLayer.Base;

namespace BVMB.DataLayer.BusinessObjects
{
    public partial class ChuyenBay : BusinessBase<int>
    {
        #region Declarations

		private System.DateTime _ngayBay = new DateTime();
		private int? _thoiGianBay = null;
		private bool _huyChuyenBay = default(Boolean);
		private int _soLuongVe = default(Int32);
		
		private SanBay _sanBay1 = null;
		private SanBay _sanBay2 = null;
		
		private IList<Ctchuyenbay> _ctchuyenbays = new List<Ctchuyenbay>();
		private IList<Ve> _ves = new List<Ve>();
		
		#endregion

        #region Constructors

        public ChuyenBay() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_ngayBay);
			sb.Append(_thoiGianBay);
			sb.Append(_huyChuyenBay);
			sb.Append(_soLuongVe);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual System.DateTime NgayBay
        {
            get { return _ngayBay; }
			set
			{
				OnNgayBayChanging();
				_ngayBay = value;
				OnNgayBayChanged();
			}
        }
		partial void OnNgayBayChanging();
		partial void OnNgayBayChanged();
		
		public virtual int? ThoiGianBay
        {
            get { return _thoiGianBay; }
			set
			{
				OnThoiGianBayChanging();
				_thoiGianBay = value;
				OnThoiGianBayChanged();
			}
        }
		partial void OnThoiGianBayChanging();
		partial void OnThoiGianBayChanged();
		
		public virtual bool HuyChuyenBay
        {
            get { return _huyChuyenBay; }
			set
			{
				OnHuyChuyenBayChanging();
				_huyChuyenBay = value;
				OnHuyChuyenBayChanged();
			}
        }
		partial void OnHuyChuyenBayChanging();
		partial void OnHuyChuyenBayChanged();
		
		public virtual int SoLuongVe
        {
            get { return _soLuongVe; }
			set
			{
				OnSoLuongVeChanging();
				_soLuongVe = value;
				OnSoLuongVeChanged();
			}
        }
		partial void OnSoLuongVeChanging();
		partial void OnSoLuongVeChanged();
		
		public virtual SanBay SanBay1
        {
            get { return _sanBay1; }
			set
			{
				OnSanBay1Changing();
				_sanBay1 = value;
				OnSanBay1Changed();
			}
        }
		partial void OnSanBay1Changing();
		partial void OnSanBay1Changed();
		
		public virtual SanBay SanBay2
        {
            get { return _sanBay2; }
			set
			{
				OnSanBay2Changing();
				_sanBay2 = value;
				OnSanBay2Changed();
			}
        }
		partial void OnSanBay2Changing();
		partial void OnSanBay2Changed();
		
		public virtual IList<Ctchuyenbay> Ctchuyenbays
        {
            get { return _ctchuyenbays; }
            set
			{
				OnCtchuyenbaysChanging();
				_ctchuyenbays = value;
				OnCtchuyenbaysChanged();
			}
        }
		partial void OnCtchuyenbaysChanging();
		partial void OnCtchuyenbaysChanged();
		
		public virtual IList<Ve> Ves
        {
            get { return _ves; }
            set
			{
				OnVesChanging();
				_ves = value;
				OnVesChanged();
			}
        }
		partial void OnVesChanging();
		partial void OnVesChanged();
		
        #endregion
    }
}
